<?php

class Modelnamezhuanhua extends GetLoad
{
	public function getname($name){
		$reluse=$this->SQLquery("SELECT * from name where name='".$name."'");
		//var_dump($name);
		return $reluse[0];

	}

	public function getname_id($name_id){
		$reluse=$this->SQLquery("SELECT * from name where name_id=".$name_id);
		return $reluse[0];

	}

	public function yanzheng($shiyanshi_id){
		$reluse=$this->SQLquery("SELECT * from name where name='".$_COOKIE['name']."' and password='".$_COOKIE['password']."'");
		$reluse=$this->SQLquery("SELECT * FROM shiyanshi where guanlizhe_id=".$reluse[0]['name_id']);

		if(isset($reluse)){
			return 1;
		}else{
			return 0;
		}
	}

	public function yanzheng1(){
		$reluse=$this->SQLquery("SELECT * from name where name='".$_COOKIE['name']."' and password='".$_COOKIE['password']."'");
		
		if(isset($reluse)){
			return 1;
		}else{
			return 0;
		}
	}

	public function getclass_id($class_id){
		$reluse=$this->SQLquery("SELECT * from class where class_id=".$class_id);
		return $reluse[0];

	}
}